home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_03_02
/
3n02064a
< prev
next >
Wrap
Text File
|
1991-12-17
|
402b
|
20 lines
{*
* view a set as a byte array
*}
type
month = (JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG,
SEP, OCT, NOV, DEC);
month_set = set of month;
byte_array = array [0 .. sizeof(month_set)-1]
of byte;
var
thirty_days : month_set;
p : ^byte_array;
i : integer;
begin
thirty_days := [APR, JUN, SEP, NOV];
p := addr(thirty_days);
for i := 0 to sizeof(p^)-1 do
writeln(p^[i]:2);
end.